const {app, BrowserWindow, ipcMain, dialog, globalShortcut} = require('electron')
const getMenuPersonal = require('./Menu')
const getWindow = require('./Window')

//TODO:引入主进程操作js
require('./controller/testController')


app.whenReady().then(() => {
    let win = new getWindow().createWindow() //创建窗口

    new getMenuPersonal(win).createMenu()  //创建工具栏

})
ipcMain.on('destroy',()=>{
    app.exit()
})
app.on('window-all-closed', () => {
    if (process.platform !== 'darwin') app.quit()
})
app.on('activate', () => {
    if (BrowserWindow.getAllWindows().length === 0) new getWindow().createWindow()
})

